.class public Lcom/teewoo/app/bus/ui/LineDetailActivity;
.super Lcom/teewoo/app/bus/inface/BaseActivity;
.source "LineDetailActivity.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/teewoo/app/bus/ui/LineDetailActivity$MyAdapter;
    }
.end annotation


# instance fields
.field private commentTab:Landroid/view/View;

.field private commentView:Landroid/widget/ImageView;

.field private line:Lcom/teewoo/app/bus/model/Line;

.field private lineCollectionManager:Lcom/teewoo/app/bus/manager/collection/LineCollectionManager;

.field private lineDetailLV:Landroid/widget/ListView;

.field private lineId:I

.field private lineName:Ljava/lang/String;

.field private proBar:Landroid/widget/ProgressBar;

.field private shareTab:Landroid/view/View;

.field private shareView:Landroid/widget/ImageView;

.field private stationsOfLine:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/teewoo/app/bus/model/Station;",
            ">;"
        }
    .end annotation
.end field

.field private tipView:Landroid/widget/TextView;

.field private titleView:Landroid/widget/TextView;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 31
    invoke-direct {p0}, Lcom/teewoo/app/bus/inface/BaseActivity;-><init>()V

    return-void
.end method

.method static synthetic access$0(Lcom/teewoo/app/bus/ui/LineDetailActivity;)Ljava/util/List;
    .locals 1
    .parameter

    .prologue
    .line 37
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->stationsOfLine:Ljava/util/List;

    return-object v0
.end method

.method static synthetic access$1(Lcom/teewoo/app/bus/ui/LineDetailActivity;)[I
    .locals 1
    .parameter

    .prologue
    .line 31
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->item_background:[I

    return-object v0
.end method

.method static synthetic access$2(Lcom/teewoo/app/bus/ui/LineDetailActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 126
    invoke-direct {p0}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->dataRequestAndProgress()V

    return-void
.end method

.method static synthetic access$3(Lcom/teewoo/app/bus/ui/LineDetailActivity;)Landroid/widget/TextView;
    .locals 1
    .parameter

    .prologue
    .line 32
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->titleView:Landroid/widget/TextView;

    return-object v0
.end method

.method static synthetic access$4(Lcom/teewoo/app/bus/ui/LineDetailActivity;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 36
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->lineName:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$5(Lcom/teewoo/app/bus/ui/LineDetailActivity;)Landroid/widget/TextView;
    .locals 1
    .parameter

    .prologue
    .line 38
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->tipView:Landroid/widget/TextView;

    return-object v0
.end method

.method static synthetic access$6(Lcom/teewoo/app/bus/ui/LineDetailActivity;)Landroid/widget/ProgressBar;
    .locals 1
    .parameter

    .prologue
    .line 39
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->proBar:Landroid/widget/ProgressBar;

    return-object v0
.end method

.method static synthetic access$7(Lcom/teewoo/app/bus/ui/LineDetailActivity;)Landroid/widget/ListView;
    .locals 1
    .parameter

    .prologue
    .line 33
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->lineDetailLV:Landroid/widget/ListView;

    return-object v0
.end method

.method static synthetic access$8(Lcom/teewoo/app/bus/ui/LineDetailActivity;)I
    .locals 1
    .parameter

    .prologue
    .line 35
    iget v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->lineId:I

    return v0
.end method

.method static synthetic access$9(Lcom/teewoo/app/bus/ui/LineDetailActivity;II)Z
    .locals 1
    .parameter
    .parameter
    .parameter

    .prologue
    .line 186
    invoke-direct {p0, p1, p2}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->hasCollected(II)Z

    move-result v0

    return v0
.end method

.method private buildSMSContent()Ljava/lang/String;
    .locals 3

    .prologue
    .line 112
    new-instance v1, Ljava/lang/StringBuffer;

    invoke-direct {v1}, Ljava/lang/StringBuffer;-><init>()V

    .line 113
    .local v1, sms:Ljava/lang/StringBuffer;
    iget-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->lineName:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 114
    iget-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->stationsOfLine:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-lez v2, :cond_0

    .line 115
    const-string v2, ",\u9014\u7ecf:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 116
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    iget-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->stationsOfLine:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-lt v0, v2, :cond_1

    .line 122
    .end local v0           #i:I
    :cond_0
    const-string v2, "http://m.doudou360.com/"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 123
    invoke-virtual {v1}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v2

    return-object v2

    .line 117
    .restart local v0       #i:I
    :cond_1
    if-eqz v0, :cond_2

    .line 118
    const-string v2, "\u2192"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 119
    :cond_2
    iget-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->stationsOfLine:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/teewoo/app/bus/model/Station;

    invoke-virtual {v2}, Lcom/teewoo/app/bus/model/Station;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 116
    add-int/lit8 v0, v0, 0x1

    goto :goto_0
.end method

.method private dataRequestAndProgress()V
    .locals 4

    .prologue
    .line 128
    invoke-virtual {p0}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->getIntent()Landroid/content/Intent;

    move-result-object v1

    .line 129
    .local v1, intent:Landroid/content/Intent;
    const-string v2, "com.teewoo.app.bus.lineId"

    const/4 v3, -0x1

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v2

    iput v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->lineId:I

    .line 130
    const-string v2, "com.teewoo.app.bus.lineName"

    invoke-virtual {v1, v2}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->lineName:Ljava/lang/String;

    .line 133
    :try_start_0
    iget v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->lineId:I

    invoke-static {v2}, Lcom/teewoo/app/bus/util/SearchUtil;->getLineStations(I)Lcom/teewoo/app/bus/model/Line;

    move-result-object v2

    iput-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->line:Lcom/teewoo/app/bus/model/Line;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 138
    :goto_0
    iget-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->line:Lcom/teewoo/app/bus/model/Line;

    if-eqz v2, :cond_1

    .line 139
    iget-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->line:Lcom/teewoo/app/bus/model/Line;

    invoke-virtual {v2}, Lcom/teewoo/app/bus/model/Line;->getListitem()Ljava/util/List;

    move-result-object v2

    iput-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->stationsOfLine:Ljava/util/List;

    .line 140
    iget-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->stationsOfLine:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-lez v2, :cond_0

    .line 141
    new-instance v2, Lcom/teewoo/app/bus/ui/LineDetailActivity$3;

    invoke-direct {v2, p0}, Lcom/teewoo/app/bus/ui/LineDetailActivity$3;-><init>(Lcom/teewoo/app/bus/ui/LineDetailActivity;)V

    invoke-virtual {p0, v2}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->runOnUiThread(Ljava/lang/Runnable;)V

    .line 179
    :cond_0
    :goto_1
    return-void

    .line 134
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 135
    .local v0, e:Ljava/lang/Exception;
    iget-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->context:Landroid/content/Context;

    const v3, 0x7f080017

    invoke-static {v2, v3}, Lcom/teewoo/app/bus/util/ToastUtil;->showToastCenter(Landroid/content/Context;I)V

    .line 136
    const/4 v2, 0x0

    iput-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->line:Lcom/teewoo/app/bus/model/Line;

    goto :goto_0

    .line 172
    .end local v0           #e:Ljava/lang/Exception;
    :cond_1
    new-instance v2, Lcom/teewoo/app/bus/ui/LineDetailActivity$4;

    invoke-direct {v2, p0}, Lcom/teewoo/app/bus/ui/LineDetailActivity$4;-><init>(Lcom/teewoo/app/bus/ui/LineDetailActivity;)V

    invoke-virtual {p0, v2}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->runOnUiThread(Ljava/lang/Runnable;)V

    goto :goto_1
.end method

.method private hasCollected(II)Z
    .locals 4
    .parameter "lineId"
    .parameter "stationId"

    .prologue
    .line 187
    iget-object v1, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->lineCollectionManager:Lcom/teewoo/app/bus/manager/collection/LineCollectionManager;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Lcom/teewoo/app/bus/manager/collection/LineCollectionManager;->findByProperty(Ljava/lang/Integer;Ljava/lang/Integer;)Lcom/teewoo/app/bus/model/collection/LineCollection;

    move-result-object v0

    .line 188
    .local v0, lineCol:Lcom/teewoo/app/bus/model/collection/LineCollection;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x1

    goto :goto_0
.end method

.method private initListener()V
    .locals 1

    .prologue
    .line 85
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->back:Landroid/view/View;

    invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 86
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->commentTab:Landroid/view/View;

    invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 87
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->shareTab:Landroid/view/View;

    invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 88
    return-void
.end method


# virtual methods
.method public initialUI()V
    .locals 2

    .prologue
    .line 69
    invoke-super {p0}, Lcom/teewoo/app/bus/inface/BaseActivity;->initialUI()V

    .line 70
    iput-object p0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->context:Landroid/content/Context;

    .line 71
    sget-object v0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->cityView:Landroid/widget/TextView;

    sget-object v1, Lcom/teewoo/app/bus/ui/Home4StaticMap;->currentCityAddress:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 72
    const v0, 0x7f0a0034

    invoke-virtual {p0, v0}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->commentTab:Landroid/view/View;

    .line 73
    const v0, 0x7f0a0036

    invoke-virtual {p0, v0}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->shareTab:Landroid/view/View;

    .line 75
    const v0, 0x7f0a0035

    invoke-virtual {p0, v0}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->commentView:Landroid/widget/ImageView;

    .line 76
    const v0, 0x7f0a0037

    invoke-virtual {p0, v0}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->shareView:Landroid/widget/ImageView;

    .line 78
    const v0, 0x7f0a002c

    invoke-virtual {p0, v0}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ListView;

    iput-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->lineDetailLV:Landroid/widget/ListView;

    .line 79
    const v0, 0x7f0a00a2

    invoke-virtual {p0, v0}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->titleView:Landroid/widget/TextView;

    .line 80
    const v0, 0x7f0a002b

    invoke-virtual {p0, v0}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->tipView:Landroid/widget/TextView;

    .line 81
    const v0, 0x7f0a002a

    invoke-virtual {p0, v0}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ProgressBar;

    iput-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->proBar:Landroid/widget/ProgressBar;

    .line 82
    new-instance v0, Lcom/teewoo/app/bus/manager/collection/LineCollectionManager;

    invoke-direct {v0, p0}, Lcom/teewoo/app/bus/manager/collection/LineCollectionManager;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->lineCollectionManager:Lcom/teewoo/app/bus/manager/collection/LineCollectionManager;

    .line 83
    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 4
    .parameter "v"

    .prologue
    .line 91
    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v2

    packed-switch v2, :pswitch_data_0

    .line 109
    :goto_0
    :pswitch_0
    return-void

    .line 93
    :pswitch_1
    iget-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->commentView:Landroid/widget/ImageView;

    const v3, 0x7f020014

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    .line 94
    iget-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->shareView:Landroid/widget/ImageView;

    const v3, 0x7f02004a

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    .line 95
    iget-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->context:Landroid/content/Context;

    const v3, 0x7f080015

    invoke-static {v2, v3}, Lcom/teewoo/app/bus/util/DialogUtil;->baseDialog(Landroid/content/Context;I)V

    goto :goto_0

    .line 98
    :pswitch_2
    iget-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->commentView:Landroid/widget/ImageView;

    const v3, 0x7f020015

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    .line 99
    iget-object v2, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->shareView:Landroid/widget/ImageView;

    const v3, 0x7f020049

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    .line 100
    new-instance v0, Landroid/content/Intent;

    const-string v2, "android.intent.action.SENDTO"

    const-string v3, "smsto:"

    invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    invoke-direct {v0, v2, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    .line 101
    .local v0, it:Landroid/content/Intent;
    invoke-direct {p0}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->buildSMSContent()Ljava/lang/String;

    move-result-object v1

    .line 102
    .local v1, sms:Ljava/lang/String;
    const-string v2, "sms_body"

    invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 103
    invoke-virtual {p0, v0}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    .line 91
    nop

    :pswitch_data_0
    .packed-switch 0x7f0a0034
        :pswitch_1
        :pswitch_0
        :pswitch_2
    .end packed-switch
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .locals 2
    .parameter "savedInstanceState"

    .prologue
    .line 49
    invoke-super {p0, p1}, Lcom/teewoo/app/bus/inface/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    .line 50
    const v0, 0x7f03000c

    invoke-virtual {p0, v0}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->setContentView(I)V

    .line 51
    invoke-virtual {p0}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->initialUI()V

    .line 52
    invoke-direct {p0}, Lcom/teewoo/app/bus/ui/LineDetailActivity;->initListener()V

    .line 53
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/LineDetailActivity;->back:Landroid/view/View;

    new-instance v1, Lcom/teewoo/app/bus/ui/LineDetailActivity$1;

    invoke-direct {v1, p0}, Lcom/teewoo/app/bus/ui/LineDetailActivity$1;-><init>(Lcom/teewoo/app/bus/ui/LineDetailActivity;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 61
    new-instance v0, Lcom/teewoo/app/bus/ui/LineDetailActivity$2;

    invoke-direct {v0, p0}, Lcom/teewoo/app/bus/ui/LineDetailActivity$2;-><init>(Lcom/teewoo/app/bus/ui/LineDetailActivity;)V

    .line 65
    invoke-virtual {v0}, Lcom/teewoo/app/bus/ui/LineDetailActivity$2;->start()V

    .line 66
    return-void
.end method
